#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time : 2021-12-20 10:20
# @Author : huabao.tan
# @File : demo1.py
# @Software: PyCharm


from power.objdect_key import *

class Test(CreatExcel):

    def createxcel(self):
        a = 0
        try:
            while True:
                a += 1
                value_name = Name.creat_name(self)
                value_age = Power.creat_age(self)
                self.sheet_row_col_value(0, a, 1, value_name)
                self.sheet_row_col_value(0, a, 2, value_age)
                if a == 10:
                    break
                print(a)
        except Exception as e:
            self.open_excel().save(self.filename)

c = Test()
c.createxcel()

